// 导入创建路由的函数
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Home from "../views/home/index";
import My from "../views/my/index";

// 创建router路由实例对象，并配置路由对应关系（路由数组）
const router = createBrowserRouter([
  {
    path: "/",
    element: <Home></Home>,
  },
  {
    path: "/my",
    element: <My />,
  },
]);

export default function AppRouter() {
  return <RouterProvider router={router} />;
}
